<?php
namespace pfp\lib {
    
    \defined( '_JEXEC' ) or die( 'Restricted access' );

    /**
     * Description of Config
     *
     * @todo 
     * 
     * @author George Zeakis<zeageorge@google.com>
     * 
     */
    class Config extends deepDynamicContainer{

        public function __construct($configuration_file_path, $framework_entryPoint){
            parent::__construct(\NULL, "MainAppConig");

            $this->_pfp_entryPoint = $framework_entryPoint;

            if (!\is_readable($configuration_file_path)){ throw new \Exception("Configuration file is not readable"); }

            try {
                require_once $configuration_file_path;
            } catch (\Exception $exc) {
                throw new \Exception("Could not read/parse configuration file: ".$exc->getMessage());
            }

            $this->pfp->_config_file_path = $configuration_file_path;
            unset($this->_pfp_entryPoint);
        }

        public function __destruct() { parent::__destruct(); }
    }
}
?>
